{include file='../__header.tpl'}
{if $ed}
    <input type="hidden" value="{$pd.product_id}" id="pid" /> 
{/if}
<input type="hidden" value="{$mod}" id="mod" /> 
<i id="scriptTag">page_iframe_alter_product</i>
<div style="padding-bottom: 55px;">
    <div style="padding-right: 22px;padding-top: 20px;" class="clearfix">
        <form id="uploadForm-pd" action="?/vProduct/ImageUpload" method="post" enctype="multipart/form-data" style="float:left;width:70%;">
            <a id="fileSubmit-pd" style='display: none;'></a>
            <input id="fileImage-pd" type="file" name="fileselect" size="1" />
            <input type="hidden" value="{$cat}" id="pd-form-cat" />
            <div style="margin-left: 22px;">
                <div class="gs-label">商品名称</div>
                <div class="gs-text">
                    <input type="text" name="" value="{if $ed}{$pd.product_name}{/if}" id="pd-form-title" />
                </div>
                <div class="clearfix">
                    <div style="float:left;width: 48%">
                        <div class="gs-label">商品价格</div>
                        <div class="gs-text">
                            <input type="text" name="" value="{if $ed}{$pd.sale_prices}{else}0.00{/if}" id="pd-form-prices" />
                        </div>
                    </div>
                    <div style="float:left;width: 48%;margin-left: 4%;">
                        <div class="gs-label">商品折扣</div>
                        <div class="gs-text">
                            <input type="text" name="" id="pd-form-discount" value="{if $ed}{$pd.discount}{else}100{/if}"/>
                        </div>
                    </div>
                </div>
                <div class="gs-label">商品简介</div>
                <span class="frm_textarea_box"><textarea class="js_desc frm_textarea" id="pd-form-desc">{if $ed}{$pd.product_subtitle}{/if}</textarea></span>
                <div class="gs-label">详细介绍</div>
            </div>
        </form>
        <div style="margin-left:70%;">
            <div id="js_appmsg_preview" class="appmsg_content" style="border-radius: 0">
                <div style="margin-bottom: 7px;">商品图片拖到下方</div>
                <div id="appmsgItem1" class="js_appmsg_item" style='padding: 0;border-radius: 0'>
                    <div class="appmsg_thumb_wrp" id="fileDragArea-pd">
                        <img class="js_appmsg_thumb appmsg_thumb" src="" id="appmsimg-preview-pd" style="display: none;">
                        <i class="appmsg_thumb default" id='appmsg_thumb-pd'>图片拖到此处</i>
                    </div>
                </div>
            </div>
            <div id='pd-images-list' class="clearfix">
                {foreach from=$pd.images item=img}
                    <img class="pd-images add" data-imagepath="{$img.image_path}" src="{$docroot}static/product_hpic/{$img.image_path}" />
                {/foreach}
            </div>
            {*            <div id="pd-delete-wp">
            <a class="wd-btn delete" id="pd-delete-btn">删除商品</a>
            </div>*}
        </div>
    </div>
    <div style="padding: 0px 22px;" class="clearfix">
        <script id="ueditorp" name="content" type="text/plain">{if $ed}{$pd.product_desc}{/if}</script>
    </div>
</div>
<div class="fix_bottom fixed">
    <a id="save_product_btn" onclick="javascript:;" class="wd-btn primary">保存</a>
    <a onclick="history.go(-1)" class="wd-btn primary">返回</a>
</div>
{include file='../__footer.tpl'} 